from multiprocessing import Process
from recServer import startRecServer
import os
import time
from zmqClient import startDecode

'''
    this script is main script of data recive program.
    port : port to recive data from hardware
    zmqPubPort : port to pub data by zmq
    host : ip address of host
'''

host='127.0.0.1'
port=5001
zmqPubPort='5000'

#start data recive 
def tcpper(ips,port,zmqPort):
	startRecServer(ips,port,zmqPort)
	print 'fds'

def dataDecode():
    startRecServer(ips,port,zmqPort)
    print 'fds'

if __name__ == "__main__":
    ips_proc=Process(target=tcpper,args=(host,port,zmqPubPort))
    ips_proc.start()
    #
    data_decoder=Process(target=startDecode,args=())
    data_decoder.start()

    ips_proc.join()
